package com.itheima.iostream;

import jdk.swing.interop.SwingInterOpUtils;

import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Arrays;

public class Demo02 {

    public static void main(String[] args) throws IOException {

        System.out.println("\r".getBytes()[0]);
        System.out.println("\n".getBytes()[0]);
        String  s="魑魅魍魉吴亦凡";
        //abcxcfgsedfgsdfgdfgjghjkfghnfghjd
        byte[] bytes = s.getBytes();//将字符串转换成对应的字节数组
        System.out.println(Arrays.toString(bytes));

        FileOutputStream fos = new FileOutputStream("day12\\b.txt",true);
        //fos.write("\r\n".getBytes());
        // \r 13回车 \n  换行10
        fos.write(13);
        fos.write(10);
        fos.write(bytes);
        fos.close();

    }
}
